package com.example.demo.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

/**
 * @description: TODO
 * @author: wzj
 * @create: 2018/12/11 19:49
 */
@Entity
public class Tbuser {
    private String id;
    private String uname;
    private String pwd;
    private String roleid;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "uname")
    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    @Basic
    @Column(name = "pwd")
    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    @Basic
    @Column(name = "roleid")
    public String getRoleid() {
        return roleid;
    }

    public void setRoleid(String roleid) {
        this.roleid = roleid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Tbuser tbuser = (Tbuser) o;
        return Objects.equals(id, tbuser.id) &&
                Objects.equals(uname, tbuser.uname) &&
                Objects.equals(pwd, tbuser.pwd) &&
                Objects.equals(roleid, tbuser.roleid);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, uname, pwd, roleid);
    }
}
